home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.smalltalk,comp.lang.java,comp.lang.c++
- Path: netcom.com!gscott
- From: gscott@netcom.com (Gavin Scott)
- Subject: Re: Smalltalk slower than C++
- Message-ID: <gscottDq3Ipq.1rz@netcom.com>
- Followup-To: comp.lang.smalltalk,comp.lang.java,comp.lang.c++
- Organization: NETCOM On-line Communication Services (408 261-4700 guest)
- X-Newsreader: TIN [version 1.2 PL1]
- References: <4kuavb$1dbc@watnews1.watson.ibm.com> <3174DD97.6BE1D26@bnr.ca> <3177048B.2CBD@alumni.caltech.edu>
- Date: Fri, 19 Apr 1996 06:15:26 GMT
- Sender: gscott@netcom.netcom.com
-
- Mike Klein (mklein@alumni.caltech.edu) wrote:
- : Here's a simple sample task:
- : Open a scrolling list interface on integers from one to ten million.
-
- : Smalltalk results:
-
- : Coding time: 20 sec. (Yes I actually timed it).
- : Execution time: 64 millisecons (Sun Ultra-1, VW2.5)
- : Source code:
-
- : SequenceView openOn: (1 to: 10000000).
-
- : I look forward to hearing *any* results from the Java/C++ world.
-
- Ok, I'll bite :-)
-
- Looks like you didn't save the SequenceView instance you created, so
- after the user selects the number he wants (say by clicking on the
- up scrollbar arrow an average of five million times) you won't be
- able to do anything with the data since you can't get to it.
-
- And I *hate* scrolling lists used for numeric input, so we'll just use
- a nice simple labeled numeric input box and do it in Java:
-
- NumericInputBox myInput = new NumericInputBox("Enter Number:", 1, 10000000);
- add(myInput);
-
- So there. Nyeah. Of course the implementation of NumericInputBox is
- left as an exercise, but it's pretty trivial to do. Watch Java have
- a more complete class library in six months than Smalltalk has got
- after 20 years.
-
- G.
-
- P.S. Smalltalk is still perhaps my favorite language, but Java has a
- lot of things going for it that ST does not.
-